home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / bcsrce2.zip / COMTXT.BC < prev    next >
Text File  |  1990-10-15  |  2KB  |  64 lines

  1. echo off
  2. let %!a = %1
  3. if %!a# = # GOTO HELP
  4. GOTO TEST2
  5. :TEST2
  6. let %!b = %2
  7. upper %!b
  8. if %!b# = # GOTO HELP
  9. let %!e = %!a
  10. let %!s = %!a
  11. IF NOT EXIST %!e GOTO HELP2
  12. filesize %!s
  13. let %!z = %!s
  14. gt %!s 63900
  15. if errorlevel 1 goto ERROR
  16. rem note:  some text editors are capable of editing a comtxt created file,
  17. rem note:  however, the first line must NEVER be changed, moved or deleted.
  18. echonolf \\190\\23\\1\\172\\138\\208\\246\\208\\52\\229\\116\\7\\180>com····.tmp
  19. echonolf \\2\\205\\33\\235\\241\\144\\205\\32>>com····.tmp
  20. echo \\32>>com····.tmp
  21. copy com····.tmp /b + %!a /a %!b.com
  22. erase com····.tmp
  23. echo Program's Syntax is--:  %!b [\\124Pipe [Filter]] [\\62Redirect [PRN/File.Ext]]
  24. echo.
  25. echo %!b, by itself, acts like the DIR command without /W or /P options.
  26. echo.
  27. echo You may use Ctrl-S to toggle pause the STDOUT display and Ctrl-C to abort.
  28. echo.
  29. echo You may wish to use LZEXE on %!b to save on space storage.
  30. GOTO END
  31. :HELP
  32. ECHO Syntax---:  COMTXT [Source.Ext] [Comname]
  33. ECHO Usage----:  Creates a .COM screen file from any pure text file that
  34. ECHO             does not exceed 63,900 bytes.
  35. ECHO.
  36. ECHO             Note:  the resultant .COM file can be copied to most
  37. ECHO                    printers without adverse effects. It also may
  38. ECHO                    be edited directly with some text editors.
  39. ECHO                    Just be sure NOT to change, move, or delete
  40. ECHO                    the first line since it will no longer execute.
  41. ECHO.
  42. ECHO             [Source.Ext] MUST be a pure ascii text file
  43. ECHO             [Source.Ext] can include box graphics (▒,╠,═,╡, etc)
  44. ECHO             [Comname] MUST NOT include an extension (.COM is added)
  45. ECHO.
  46. ECHO                                TIP
  47. ECHO DIR C:\MM\DRAWER\*.DOC \\124 SORT \\62 Textemp.Txt
  48. ECHO COMTXT Textemp.Txt DOCS
  49. ECHO DOCS
  50. ECHO DOCS \\62 PRN
  51. GOTO END
  52. :ERROR
  53. echo %!a has %!z bytes which excedes the 63,900 limit!
  54. echo.
  55. waitkey 2
  56. goto HELP
  57. :HELP2
  58. echo Unable to locate a file named %!a\\33
  59. echo.
  60. waitkey 2
  61. goto HELP
  62. :END
  63.  
  64.